<?php


defined("APP_DEBUG")  || define("APP_DEBUG",false);

//整个系统的路径
defined("CPATH_ROOT") || define("CPATH_ROOT",	dirname(dirname(__FILE__)));

define("CPATH_INSTALL",	CPATH_ROOT . '/install');
define("CPATH_FRAME",	CPATH_ROOT . '/frame');
define("CPATH_DATA",	CPATH_ROOT . '/data');
define("CPATH_DATATPL", CPATH_DATA . '/tpl');

//如果系统的配置文件不存在或太小，且安装目录文件存在
if(!is_file(CPATH_ROOT.'/config.inc.php') || (filesize(CPATH_ROOT.'/config.inc.php') <10)   ) {
	if(is_file(CPATH_INSTALL.'/index.php')) { //如果安装目录存在，跳转
		header('Location: '.substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php')).'installation/index.php');
	} else {
		header("Content-Type:text/html;charset=utf-8");
		echo "配置文件，安装目录都不存在";
	}
	exit();
}	

require CPATH_FRAME . '/CFrame.class.php';


